<html lang="en">
<head>
    <title>游记评论管理</title>
    <#include "../common/header.ftl">

    <link type="text/css" rel="stylesheet" href="/js/plugins/uploadifive/uploadifive.css" />
    <script type="text/javascript" src="/js/plugins/uploadifive/jquery.uploadifive.min.js"></script>

    <script type="text/javascript">
        $(function () {
            var url = $(this).data("url");
            $(".deleteBtn").click(function () {
                $.ajaxGet(url,{},function (data) {
                    if (data.code == 200) {
                        $.messager.popup(data.msg);
                        window.setTimeout(function () {
                            window.location.href = "/travelComment/list";
                        }, 2000);
                    } else {
                        $.messager.popup(data.msg);
                    }
                })
            });
        })
    </script>
</head>
<body>
<!--左侧菜单回显变量设置-->
<#assign currentMenu="travelComment">

<div class="container-fluid " style="margin-top: 20px">
    <#include "../common/top.ftl">
    <div class="row">
        <div class="col-sm-2">
            <#include "../common/menu.ftl">
        </div>
        <div class="col-sm-10">
            <div class="row">
                <div class="col-sm-12">
                    <h1 class="page-head-line">游记评论管理</h1>
                </div>
            </div>
            <#setting number_format="#">
            <!--高级查询--->
            <form class="form-inline" id="searchForm" action="/travelComment/list" method="post">
                <input type="hidden" name="currentPage" id="currentPage" value="1">
                <input type="text" class="form-control" id="keyword" name="keyword" value="${(qo.keyword)!}" placeholder="输入游记标题关键字/评论人">
                <button id="btn_query" class="btn btn-default">
                    <span class="glyphicon glyphicon-search"></span> 查询
                </button>
            </form>

            <table class="table table-striped table-hover" >
                <thead>
                    <tr>
                        <th>序号</th>
                        <th>游记</th>
                        <th>评论人</th>
                        <th>评论内容</th>
                        <th>操作</th>
                    </tr>
                </thead>
               <#list page.content as entity>
                   <tr>
                       <td>${entity_index+1}</td>
                       <td>${entity.travelTitle}</td>
                       <td>${entity.nickname!}</td>
                       <td>${entity.content!}</td>
                       <td>
                           <a href="javascript:;" class="btn btn-danger btn-xs deleteBtn"
                              data-url="/travelComment/delete?id=${entity.id}">
                               <span class="glyphicon glyphicon-trash"></span> 删除
                           </a>
                       </td>
                   </tr>
               </#list>
            </table>
            <#--分页-->
            <#include "../common/page.ftl"/>
        </div>
    </div>
</div>
</body>
</html>